module.exports = Behavior({
  /**
   * 组件的属性列表
   */
  properties: {
    chartId: {
      type: String,
      value: ""
    },
    canvasId: {
      type: String,
      value:""
    },
    options: {
      type: Object,
      value: {}
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    oldCanvas: ''
  },

  /**
   * 生命周期
   */
  lifetimes: {
    ready: function() {
      // 解决echarts在模拟器和真机层级问题
      const _this = this
      wx.getSystemInfo({
        success: function(res) {
          _this.setData({
            oldCanvas: res.platform == 'devtools'
          })
        }
      })
    }
  }

}) 